*Appendix Figure 4

cd "/Users/kevin/Dropbox/TZ ITNs"
set more off
set varabbrev off

use "constructed data/for_analysis.dta", clear

cd "/Users/kevin/Dropbox/TZ ITNs/plots"


forvalues i=10(10)50 {
reg approve_vc1 post  if malaria`i'==1 & period_90==1 &  omitperiod==0, r cluster(distcode)
estimates store malaria`i'
}


coefplot (malaria10, label("< 10%")) (malaria20, label("10-20%")) (malaria30, label("20-30%")) ///
(malaria40, label("30-40%")) (malaria50, label(">40%")), keep(post) rename(post="treatment effect") ///
vertical graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))  ciopts(lcolor(black)) mcolor(black) ///
title("VC approval") ylabel(-0.2(0.2)0.8) yscale(r(-0.2, 0.8)) ///
xlabel( .668 "<10" .834 "10-20" 1 "20-30" 1.166 "30-40" 1.332 ">40", labs(small)) legend(off) xtitle("Prevalence category", size(medlarge))
graph save Graph "vc_prev_bw_nozone.gph", replace
graph export vc_prev_bw_nozone.pdf, as(pdf) replace


forvalues i=10(10)50 {
reg approve_veo1 post  if malaria`i'==1 & period_90==1 &  omitperiod==0, r cluster(distcode)
estimates store malaria`i'
}

coefplot (malaria10, label("< 10%")) (malaria20, label("10-20%")) (malaria30, label("20-30%")) ///
(malaria40, label("30-40%")) (malaria50, label(">40%")), keep(post) rename(post="treatment effect") ///
vertical graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))  ciopts(lcolor(black)) mcolor(black) ///
title("VEO approval") ylabel(-0.2(0.2)0.8) yscale(r(-0.2, 0.8)) ///
xlabel( .668 "<10" .834 "10-20" 1 "20-30" 1.166 "30-40" 1.332 ">40", labs(small)) legend(off) xtitle("Prevalence category", size(medlarge))
graph save Graph "veo_prev_bw_nozone.gph", replace
graph export veo_prev_bw_nozone.pdf, as(pdf) replace


forvalues i=10(10)50 {
reg approve_councillor1 post  if malaria`i'==1 & period_90==1 &  omitperiod==0, r cluster(distcode)
estimates store malaria`i'
}

coefplot (malaria10, label("< 10%")) (malaria20, label("10-20%")) (malaria30, label("20-30%")) ///
(malaria40, label("30-40%")) (malaria50, label(">40%")), keep(post) rename(post="treatment effect") ///
vertical graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))  ciopts(lcolor(black)) mcolor(black) ///
title("Councillor approval") ylabel(-0.2(0.2)0.8) yscale(r(-0.2, 0.8)) ///
xlabel( .668 "<10" .834 "10-20" 1 "20-30" 1.166 "30-40" 1.332 ">40", labs(small)) legend(off) xtitle("Prevalence category (%)", size(medlarge))
graph save Graph "councillor_prev_bw_nozone.gph", replace
graph export councillor_prev_bw_nozone.pdf, as(pdf) replace

forvalues i=10(10)50 {
reg approve_weo1 post  if malaria`i'==1 & period_90==1 &  omitperiod==0, r cluster(distcode)
estimates store malaria`i'
}

coefplot (malaria10, label("< 10%")) (malaria20, label("10-20%")) (malaria30, label("20-30%")) ///
(malaria40, label("30-40%")) (malaria50, label(">40%")), keep(post) rename(post="treatment effect") ///
vertical graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))  ciopts(lcolor(black)) mcolor(black) ///
title("WEO approval") ylabel(-0.2(0.2)0.8) yscale(r(-0.2, 0.8)) ///
xlabel( .668 "<10" .834 "10-20" 1 "20-30" 1.166 "30-40" 1.332 ">40", labs(small)) legend(off) xtitle("Prevalence category (%)", size(medlarge))
graph save Graph "weo_prev_bw_nozone.gph", replace
graph export weo_prev_bw_nozone.pdf, as(pdf) replace


forvalues i=10(10)50 {
reg approve_mp1 post  if malaria`i'==1 & period_90==1 &  omitperiod==0, r cluster(distcode)
estimates store malaria`i'
}

coefplot (malaria10, label("< 10%")) (malaria20, label("10-20%")) (malaria30, label("20-30%")) ///
(malaria40, label("30-40%")) (malaria50, label(">40%")), keep(post) rename(post="treatment effect") ///
vertical graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))  ciopts(lcolor(black)) mcolor(black) ///
title("MP approval") ylabel(-0.2(0.2)0.8) yscale(r(-0.2, 0.8)) ///
xlabel( .668 "<10" .834 "10-20" 1 "20-30" 1.166 "30-40" 1.332 ">40", labs(small)) legend(off) xtitle("Prevalence category (%)", size(medlarge))
graph save Graph "mp_prev_bw_nozone.gph", replace
graph export mp_prev_bw_nozone.pdf, as(pdf) replace

graph combine "vc_prev_bw_nozone.gph" "veo_prev_bw_nozone.gph"  "councillor_prev_bw_nozone.gph" "weo_prev_bw_nozone.gph" "mp_prev_bw_nozone.gph", ///
  rows(2) cols(3) subtitle(, color(black) fcolor(white) lcolor(white)) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))

